
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 合同列表
export function getContractList(params) {
  return request({
    url: host + '/contract/list',
    method: 'get',
    params
  })
}

// 新增合同
export function saveContract(data) {
  return request({
    url: host + '/contract/save',
    method: 'post',
    data
  })
}

// 修改合同
export function updateContract(data) {
  return request({
    url: host + '/contract/update',
    method: 'post',
    data
  })
}

// 获取合同详情
export function getContract(params) {
  return request({
    url: host + '/contract/detail',
    method: 'get',
    params
  })
}

// 删除合同
export function deleteContract(data) {
  return request({
    url: host + '/contract/delete',
    method: 'post',
    data
  })
}

// customer  ​ / dropDown
export function getContractSelect(params) {
  return request({
    url: host + '/contract/dropDown',
    method: 'get',
    params
  })
}
// /contract/detailList
export function getDetailList(params) {
  return request({
    url: host + '/contract/detailList',
    method: 'get',
    params
  })
}
